package com.yonyou.brigade.openapi.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yonyou.brigade.rtpnr.service.IRtpnrPublicService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/user")
@RestController
public class UserController {

    private Logger logger= LoggerFactory.getLogger(UserController.class);

    @Autowired
    private IRtpnrPublicService rtpnrPublicService;

    @RequestMapping(value = "/auth/secondaryAuthor", method = RequestMethod.POST)
    public JSONObject saveOrderInfos(@RequestBody JSONObject params) {
        logger.info("设置二次授权人的参数为" + JSON.toJSONString(params));
        JSONObject result = rtpnrPublicService.exceedStandardApproval(params);
        return result;
    }
}
